using System;
using System.Threading;
namespace AppToolKit.Business.App
{
	public class SingletonApp
	{
		public void SingletonRun(string name)
		{
			bool flag;
			using (new Mutex(true, name, out flag))
			{
				if (flag)
				{
					this.OnRun();
				}
				else
				{
					this.OnExit();
				}
			}
		}
		protected virtual void OnExit()
		{
			throw new NotImplementedException();
		}
		protected virtual void OnRun()
		{
			throw new NotImplementedException();
		}
	}
}
